﻿using System;
using Microsoft.Xna.Framework.Graphics;
using Terraria.Graphics;

namespace Terraria.Initializers
{
	// Token: 0x02000339 RID: 825
	public static class PlayerDataInitializer
	{
		// Token: 0x06001EEF RID: 7919 RVA: 0x0044BA2C File Offset: 0x00449C2C
		public static void Load()
		{
			Main.playerTextures = new Texture2D[10, 15];
			PlayerDataInitializer.LoadStarterMale();
			PlayerDataInitializer.LoadStarterFemale();
			PlayerDataInitializer.LoadStickerMale();
			PlayerDataInitializer.LoadStickerFemale();
			PlayerDataInitializer.LoadGangsterMale();
			PlayerDataInitializer.LoadGangsterFemale();
			PlayerDataInitializer.LoadCoatMale();
			PlayerDataInitializer.LoadDressFemale();
			PlayerDataInitializer.LoadDressMale();
			PlayerDataInitializer.LoadCoatFemale();
		}

		// Token: 0x06001EF0 RID: 7920 RVA: 0x0044BA7C File Offset: 0x00449C7C
		private static void LoadDebugs()
		{
			PlayerDataInitializer.CopyVariant(8, 0);
			PlayerDataInitializer.CopyVariant(9, 4);
			for (int i = 8; i < 10; i++)
			{
				Main.playerTextures[i, 4] = Main.armorArmTexture[191];
				Main.playerTextures[i, 6] = Main.armorArmTexture[191];
				Main.playerTextures[i, 11] = Main.armorArmTexture[191];
				Main.playerTextures[i, 12] = Main.armorArmTexture[191];
				Main.playerTextures[i, 13] = Main.armorArmTexture[191];
				Main.playerTextures[i, 8] = Main.armorArmTexture[191];
			}
		}

		// Token: 0x06001EF1 RID: 7921 RVA: 0x0044BB38 File Offset: 0x00449D38
		private static void LoadVariant(int ID, int[] pieceIDs)
		{
			for (int i = 0; i < pieceIDs.Length; i++)
			{
				Main.playerTextures[ID, pieceIDs[i]] = TextureManager.Load(string.Concat(new object[]
				{
					"Images/Player_",
					ID,
					"_",
					pieceIDs[i]
				}));
			}
		}

		// Token: 0x06001EF2 RID: 7922 RVA: 0x0044BB98 File Offset: 0x00449D98
		private static void CopyVariant(int to, int from)
		{
			for (int i = 0; i < 15; i++)
			{
				Main.playerTextures[to, i] = Main.playerTextures[from, i];
			}
		}

		// Token: 0x06001EF3 RID: 7923 RVA: 0x00015E26 File Offset: 0x00014026
		private static void LoadStarterMale()
		{
			PlayerDataInitializer.LoadVariant(0, new int[]
			{
				0,
				1,
				2,
				3,
				4,
				5,
				6,
				7,
				8,
				9,
				10,
				11,
				12,
				13
			});
			Main.playerTextures[0, 14] = TextureManager.BlankTexture;
		}

		// Token: 0x06001EF4 RID: 7924 RVA: 0x00015E52 File Offset: 0x00014052
		private static void LoadStickerMale()
		{
			PlayerDataInitializer.CopyVariant(1, 0);
			PlayerDataInitializer.LoadVariant(1, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13
			});
		}

		// Token: 0x06001EF5 RID: 7925 RVA: 0x00015E72 File Offset: 0x00014072
		private static void LoadGangsterMale()
		{
			PlayerDataInitializer.CopyVariant(2, 0);
			PlayerDataInitializer.LoadVariant(2, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13
			});
		}

		// Token: 0x06001EF6 RID: 7926 RVA: 0x00015E92 File Offset: 0x00014092
		private static void LoadCoatMale()
		{
			PlayerDataInitializer.CopyVariant(3, 0);
			PlayerDataInitializer.LoadVariant(3, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13,
				14
			});
		}

		// Token: 0x06001EF7 RID: 7927 RVA: 0x00015EB2 File Offset: 0x000140B2
		private static void LoadDressMale()
		{
			PlayerDataInitializer.CopyVariant(8, 0);
			PlayerDataInitializer.LoadVariant(8, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13,
				14
			});
		}

		// Token: 0x06001EF8 RID: 7928 RVA: 0x00015ED2 File Offset: 0x000140D2
		private static void LoadStarterFemale()
		{
			PlayerDataInitializer.CopyVariant(4, 0);
			PlayerDataInitializer.LoadVariant(4, new int[]
			{
				3,
				4,
				5,
				6,
				7,
				8,
				9,
				10,
				11,
				12,
				13
			});
		}

		// Token: 0x06001EF9 RID: 7929 RVA: 0x00015EF3 File Offset: 0x000140F3
		private static void LoadStickerFemale()
		{
			PlayerDataInitializer.CopyVariant(5, 4);
			PlayerDataInitializer.LoadVariant(5, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13
			});
		}

		// Token: 0x06001EFA RID: 7930 RVA: 0x00015F13 File Offset: 0x00014113
		private static void LoadGangsterFemale()
		{
			PlayerDataInitializer.CopyVariant(6, 4);
			PlayerDataInitializer.LoadVariant(6, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13
			});
		}

		// Token: 0x06001EFB RID: 7931 RVA: 0x00015F33 File Offset: 0x00014133
		private static void LoadCoatFemale()
		{
			PlayerDataInitializer.CopyVariant(7, 4);
			PlayerDataInitializer.LoadVariant(7, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13,
				14
			});
		}

		// Token: 0x06001EFC RID: 7932 RVA: 0x00015F53 File Offset: 0x00014153
		private static void LoadDressFemale()
		{
			PlayerDataInitializer.CopyVariant(9, 4);
			PlayerDataInitializer.LoadVariant(9, new int[]
			{
				4,
				6,
				8,
				11,
				12,
				13
			});
		}
	}
}
